import request from '@/utils/request'

// 查询观看历史列表
export function listHistory(query) {
  return request({
    url: '/member/history/list',
    method: 'get',
    params: query
  })
}

// 新增观看记录
export function addHistory(data) {
  return request({
    url: '/member/history',
    method: 'post',
    data: data
  })
}

// 删除观看历史
export function delHistory(historyId) {
  return request({
    url: '/member/history/' + historyId,
    method: 'delete'
  })
}

// 清空观看历史
export function clearHistory(memberId) {
  return request({
    url: '/member/history/clear/' + memberId,
    method: 'delete'
  })
}

// 导出观看历史
export function exportHistory(query) {
  return request({
    url: '/member/history/export',
    method: 'get',
    params: query
  })
}